<template>
  <view class="bg-white radius padding margin-top-sm flex align-center justify-between margin-lr"
    v-for="item in studentList" :key="item.id" @click="checkReport(item)">
    <u-text :text="item.name" size="32rpx" color="#333"></u-text>
    <u-text :text="item.status === 1 ? '已生成' : '待生成'" size="24rpx"
      :color="item.status === 1 ? '#0060E6' : '#FF5252'"></u-text>
    <u-icon name="arrow-right" color="#999" size="16"></u-icon>
  </view>
</template>
<script setup>
import { ref } from 'vue';

const studentList = ref([
  {
    id: 1,
    name: '张三',
    status: 1,//1:已生成 2:待生成
  },
  {
    id: 2,
    name: '李四',
    status: 2,//1:已生成 2:待生成
  },
])

const checkReport = (item) => {
  uni.navigateTo({
    url: `/pages/teacher/classroom/weekReport?id=${item.id}`
  })
}
</script>